package club.caihappy.server.utils;

import club.caihappy.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * 操作员工具类
 * Created by DELL on 2022/5/25
 **/
public class AdminUtils {

    public static Admin getCurrentAdmin() {
        return ((Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal());
    }

}
